Developer Documentation

QuickTime 4 API Documentation

QuickTime Movie File Format Specification, May 1996

| Previous | Chapter contents | Chapter top | Next |

Sample Description Atoms

The sample description atom stores information that allows you to decode samples in the media. The data stored in the sample description varies, depending on the media type. For example, in the case of video media, the sample descriptions are image description structures. The sample description information for each media type is explained later in this document, in "Media Data Atom Types" .

Figure 1-30 shows the layout of a sample description atom.

Figure 30 The layout of a sample description atom

The sample description atom has an atom type of 'stsd' . The sample description atom contains a table of sample descriptions. A media may have one or more sample descriptions, depending upon the number of different encoding schemes used in the media and on the number of files used to store the data. The sample-to-chunk atom identifies the sample description for each sample in the media by specifying the index into this table for the appropriate description (see "Sample-to-Chunk Atoms," beginning on [link] ).

The sample description atom contains the following data elements.

Size
A 32-bit integer that specifies the number of bytes in this sample description atom.
Type
A 32-bit integer that identifies the atom type; this field must be set to 'stsd' .
Version
A 1-byte specification of the version of this sample description atom.
Flags
A 3-byte space for sample description flags. Set this field to 0.
Number of entries
A 32-bit integer containing the number of sample descriptions that follow.
Sample description table
An array of sample descriptions.

While the exact format of the sample description varies by media type, the first four fields of every sample description table are the same.

Sample description size
A 32-bit integer indicating the number of bytes in the sample description.
Data format
A 32-bit integer indicating the format of the stored data. This depends on the media type, but is usually either the compression format or the media type.
Reserved
Six bytes that must be set to 0.
Data reference index
A 16-bit integer that contains the index of the data reference to use to retrieve data associated with samples that use this sample description. Data references are stored in data reference atoms.

© 1997 Apple Computer, Inc.

| Previous | Chapter contents | Chapter top | Next |